<?php
require_once "./db_config.php";
$id=$_POST['id'];
$status=$_POST['status'];
if($status=='0'){
  $sql="UPDATE dynamic_form SET `delete`='1' WHERE id='$id'";
  $result=mysqli_query($conn,$sql);
  if(! $result )
  {
    die('error: ' . mysqli_error($conn));
  }else{
    echo "success";
  }
}else{
  $sql="UPDATE dynamic_form_properties SET `delete`='1' WHERE id='$id'";
  $result=mysqli_query($conn,$sql);
  if(! $result )
  {
    die('error: ' . mysqli_error($conn));
  }else{
    echo "success";
  }
}

mysqli_close($conn);
